x86 hvm: On failed hvm_send_assist_req(), io emulation state should be
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 7 Oct 2009 07:07:06 +0000 (08:07 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 7 Oct 2009 07:07:06 +0000 (08:07 +0100)
reset to HVMIO_none, as no IO is in flight.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/emulate.c

index ac3f807c22f964ead48517689de8130233361c66..9168158e0ba7c93aa28d274043ce3ee092574993 100644 (file)
@@ -163,8 +163,11 @@ static int hvmemul_do_io(
         curr->arch.hvm_vcpu.io_state = HVMIO_none;
         break;
     case X86EMUL_UNHANDLEABLE:
-        rc = (!hvm_send_assist_req(curr) || (p_data != NULL)
-              ? X86EMUL_RETRY : X86EMUL_OKAY);
+        rc = X86EMUL_RETRY;
+        if ( !hvm_send_assist_req(curr) )
+            curr->arch.hvm_vcpu.io_state = HVMIO_none;
+        else if ( p_data == NULL )
+            rc = X86EMUL_OKAY;
         break;
     default:
         BUG();